php forum
php mysql forum
php mysql smarty
 
Topic Options
#199536 - 03/11/03 07:13 AM [6.4 - 6.5] Display Times Without JavaScript
LK Offline
Admin / Code Breaker

Registered: 03/24/01
Posts: 7396
Very simple script, suggested by gero:

Open ubb_lib_time.cgi.
Find:
Code:
	return qq~
<script language="JavaScript1.3" type="text/javascript">
document.writeln(timestamp(new Date($datestring), $dfrm, $tfrm, $dclass, $tclass, $rev, $noadj));
</script>~;
Replace with:
Code:
	my $noscript = $dfrm eq 'dfrm' && $tfrm eq 'tfrm'
	? &DateFormat($_[0]) . " " . &TimeFormat($_[1]) :
	$dfrm eq 'dfrm' ? &DateFormat($_[0]) :
	$tfrm eq 'tfrm' ? &TimeFormat($_[1]) : '';
	return qq~
<script language="JavaScript1.3" type="text/javascript">
document.writeln(timestamp(new Date($datestring), $dfrm, $tfrm, $dclass, $tclass, $rev, $noadj));
</script><noscript>$noscript</noscript>~;
_________________________

My Hacks Page (will be back with UBB 7!)
UBBDev - We put the class into UBB.classic!

Top
#199537 - 03/11/03 08:28 PM Re: [6.4 - 6.5] Display Times Without JavaScript
AllenAyres Offline

I type Like navaho

Registered: 03/10/00
Posts: 25580
Loc: Texas
thanks LK, giving it a shot right now laugh
_________________________
- Allen wavey
- What Drives You?

Top
#199538 - 03/11/03 09:07 PM Re: [6.4 - 6.5] Display Times Without JavaScript
ADWOFF Offline
Content Queen

Registered: 05/07/01
Posts: 709
Loc: Pennsylvania
Question, would this prevent it from continuing to go out of whack--like it did the other day here at UBBDev? laugh
_________________________
Sue
adwoff.com

Top
#199539 - 03/11/03 09:57 PM Re: [6.4 - 6.5] Display Times Without JavaScript
AllenAyres Offline

I type Like navaho

Registered: 03/10/00
Posts: 25580
Loc: Texas
this fixes it for your users using older copies of IE or IE with javascript turned off.
_________________________
- Allen wavey
- What Drives You?

Top
#199540 - 05/04/03 07:24 PM Re: [6.4 - 6.5] Display Times Without JavaScript
Mirek Offline
Member

Registered: 05/01/02
Posts: 35
I just upgraded to 6.5.. added a few hacks... everything is going fine and then people start telling me that they can't see the timestamps... I can see them fine in Mozilla.. but people with IE can't see them... anyone have any ideas?

I compared the html with ubbdev's and it looks the same (I can see it in ie 6 on ubbdev, but not on my page... none of the time stamps on any pages)

Tried this code, still doing the same thing... I am lost.


edit: seems that clearing out the cookies fixes it...


edit 2: or not... goes back to not displaying the dates, logging out and back in also seems to fix it... and it looks like it's not just ie, but Mozilla at times too


one more edit: going to your profile and updating the settings SEEMS to fix it...

Top
#199541 - 05/04/03 11:23 PM Re: [6.4 - 6.5] Display Times Without JavaScript
Charles Capps Offline
Admin Emeritus

Registered: 01/09/00
Posts: 5438
Loc: Lynnwood, WA
Aye... edit the profile, log out, clear the cookies, then log back in. That fixes most of the time problems.
_________________________
UBB.classic: Love it or hate it, it was mine.

Top



Moderator:  Charles, Gizmo 
Latest Posts
[7.2.1] - Naked shoutbox
by bellaonline
05/05/12 05:00 PM
[7.x] Stop Forum Spam Integration v0.4
by bellaonline
05/05/12 03:53 PM
Shout Box

(Views)Popular Topics
Known public proxy servers 1689885
Integrated Index Page (IIP) 5.3.1 555705
Finished-[6.5.2] Games Arcade Deluxe v1.9 501236
Integrated Index Page (IIP) 5.1.1 415112
TLD Bv2.1 Released - Threads Links Directory 396822
[6.0x] Who's Online 4.0.0 [Finished] 389412
Finished-[6.5.1] Integrated Index Page (IIP) 6.5 330423
Q & A 298663
Slash UBB 266936
[6.3.x] [beta] Hit Hack 2.0 227970
Forum Stats
13621 Members
59 Forums
37191 Topics
295716 Posts

Max Online: 686 @ 06/28/07 07:04 AM

 

 

 
fusionbb message board php hacks